<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="Trainercity v1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="<?php echo $this->_var['keywords']; ?>" />
<meta name="Description" content="<?php echo $this->_var['description']; ?>" />
<title><?php echo $this->_var['page_title']; ?></title>
<link href="<?php echo $this->_var['ecs_css_path']; ?>" rel="stylesheet" type="text/css" />

<?php echo $this->smarty_insert_scripts(array('files'=>'transport.js,common.js,user.js')); ?>
<script type="text/javascript">


  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1848127-18']);
  _gaq.push(['_setDomainName', '.fitwow.com']);
  _gaq.push(['_trackPageview']);


  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();


</script></head>
<body style="width:1280px; " >
<?php if ($this->_var['info']['user_type'] == 1): ?>
<div class="box1" >
<?php echo $this->fetch('library/page_header.lbi'); ?>
    <div class="column">
    	<div class="l_nav_con">
                <ul>
                    <li><a href="user.php" >My Dashboard</a></li>
                    <li><a href="projects.php?act=my_clients_proposals" style="color: #FFFFFF; background-color: #CCCCCC" >My Offers</a></li>
                    <li><a href="user.php?act=profile" >Manage Account</a></li>
                </ul>
            </div>
    </div>
    <div class="l_con mannge_acc">
    	<div class="right_posta">
            	<ul >
                	<li><a href="projects.php?act=browse">Browse training projects</a></li>
                </ul>
      		</div>  
            
        <div style="margin-top:20px;">	  
			<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:30px;border-collapse:collapse;border:none;border:solid #CCC 2px;">
  				<tr  >
    				<td width="71%" height="25" align="left" ><span style="font-size:30px; margin-left:15px; font-weight:bold;"><?php echo $this->_var['info']['firstname']; ?> <?php echo $this->_var['info']['lastname']['0']; ?></span></td>
    				<td width="29%" align="right"><span style="font-size:12px; margin-right:15px;"><?php echo $this->_var['info']['projects_entered']; ?> projects entered</span></td>
  				</tr>
  				<tr>
    				<td height="22" align="left">
					<?php if ($this->_var['info']['experienceType']): ?>
					<span style="font-size:12px; margin-left:15px;"><?php echo $this->_var['info']['experienceType']; ?>  Years Experiences</span> 
					<?php endif; ?>
					</td>
    				<td align="right"><span style="font-size:12px; margin-right:15px;"><?php echo $this->_var['info']['projects_won']; ?> projects won</span></td>
  					</tr>
  				<tr>
    				<td height="21" align="left">
					<?php if ($this->_var['info']['address']): ?>
					<span style="font-size:12px; margin-left:15px;"><?php echo $this->_var['info']['address']; ?>, <?php echo $this->_var['info']['province']; ?>, <?php echo $this->_var['info']['country']; ?></span>
					<?php endif; ?>
					</td>
    				<td align="right">
					<span style="font-size:12px; margin-right:15px;">Total $<?php echo $this->_var['info']['totalEarn']; ?> Earned</span>
					</td>
  				</tr>
			</table>
        </div>
        
		<div class="profile" style="text-align:center; background-color:#CCCCCC;">
			<br />
        	<a href="user.php">
			<?php if ($this->_var['info']['photo']): ?>
			<img src="<?php echo $this->_var['info']['photo']; ?>" />
			<?php elseif ($this->_var['info']['genderType'] == 'female'): ?>
			<img src="themes/default/images/girls.gif" />
			<?php else: ?>
			<img src="themes/default/images/boys.gif" />
			<?php endif; ?>
			</a>
			<br />
			<label>
        	<a href="user.php?act=aboutme"><input type="submit" name="button" id="button" class="edita" style=" margin-top:15px; margin-bottom:10px; width:142px; height:35px;" value="Edit profile" /></a>
      		</label> 
			<div>
			<table align="center" width="100%" >
					<tr width="100%" >
						<td width="100%">
						<span style="font-weight:bold; font-size:12px; border-bottom-style:double; height:30px; line-height:30px">Services &nbsp;&nbsp;   providing:</span>
						</td>
					</tr>
					<tr width="100%" >
						<td width="100%" style="word-wrap:break-word;">
						<?php echo $this->_var['info']['trainingServiceType']; ?>
						</td>
					</tr>
					<tr width="100%" >
						<td width="100%">
						<span style="font-weight:bold; font-size:12px; border-bottom-style:double; height:30px; line-height:30px"> Training &nbsp;&nbsp; Specialties</span>
						</td>
					</tr>
					<tr width="100%" >
						<td width="100%" style="word-wrap:break-word;">
						<?php echo $this->_var['info']['training_specialties']; ?>
						</td>
					</tr>
					<tr width="100%" >
						<td width="100%">
						<span style="font-weight:bold; font-size:12px; border-bottom-style:double; height:30px; line-height:30px"> Credentials</span>
						</td>
					</tr>
					<tr width="100%" >
						<td width="100%" style="word-wrap:break-word;">
						<?php echo $this->_var['info']['credentials']; ?>
						</td>
					</tr>
					<tr width="100%" >
						<td width="100%">
						<span style="font-weight:bold; font-size:12px; border-bottom-style:double; height:30px; line-height:30px">School</span>
						</td>
					</tr>
					<tr width="100%" >
						<td width="100%" style="word-wrap:break-word;">
						<?php echo $this->_var['info']['school']; ?>
						</td>
					</tr>
					<tr width="100%" >
						<td width="100%">
						<span style="font-weight:bold; font-size:12px; border-bottom-style:double; height:30px; line-height:30px">Major</span>
						</td>
					</tr>
					<tr width="100%" >
						<td width="100%" style="word-wrap:break-word;">
						<?php echo $this->_var['info']['major']; ?>
						</td>
					</tr>
				</table>
			
			</div>
            <br />
            <br />
		</div>
		
        <div class="Projects_won">
			<?php if ($this->_var['info']['won_number'] != 0 && $this->_var['info']['review_number'] == - 1): ?>
			<!--<div class="Proj1">Alert</div>
			<div class="Proj2">
				<?php echo $this->_var['info']['won_number']; ?> awarded <br/>
				<?php echo $this->_var['info']['review_number']; ?> review
			</div>
 -->			<?php endif; ?>
			<?php if ($this->_var['proposalsWonNum'] != 0): ?>
        	<div class="Proj1">Projects won</div>
          	<div class="Proj2" style="margin-bottom:20px;">
				<table >
						<tr>
							<td width="20%" style="font-size:16px;" class="Proj2a">
								Client's projects
							</td>
							<td width="20%" style="font-size:16px;" class="Proj2a">
								My proposal
							</td>
							<td width="20%" style="font-size:16px;" class="Proj2a">
								Phone
							</td>
							<td width="25%" style="font-size:16px;" class="Proj2a">
								Days left to accept
							</td>
							<td width="15%" style="font-size:16px;" class="Proj2a">
								Next step
							</td>
						</tr>
						<?php $_from = $this->_var['proposalsWonlist']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'proposalWon');if (count($_from)):
    foreach ($_from AS $this->_var['proposalWon']):
?>
						<tr >
							<td width="20%" style="font-size:14px; font-weight:bold; padding-top:5px; padding-bottom:5px; text-align:center;" >
								<a href="projects.php?act=view_project&pid=<?php echo $this->_var['proposalWon']['pid']; ?>"><?php echo $this->_var['proposalWon']['subject']; ?></a>
							</td>
							<td width="20%" style="font-size:14px; font-weight:bold; text-align:center;">
								<a href="projects.php?act=project_proposal&pid=<?php echo $this->_var['proposalWon']['pid']; ?>&ppid=<?php echo $this->_var['proposalWon']['ppid']; ?>">My proposal detail</a>
							</td>
							<td width="20%" style="font-size:14px; font-weight:bold; text-align:center;" >
								<?php echo $this->_var['proposalWon']['contactPhone']; ?>
							</td>
							<td width="25%" style="font-size:14px; font-weight:bold; text-align:center;" >
								<?php echo $this->_var['proposalWon']['lefttime']; ?>
							</td>
							<td width="15%" style="font-size:14px; font-weight:bold; text-align:center;" >
								<a href="projects.php?act=act_accept_award&ppid=<?php echo $this->_var['proposalWon']['ppid']; ?>&pid=<?php echo $this->_var['proposalWon']['pid']; ?>">Accept</a>
							</td>
						</tr>
						<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
						
					</table>
				            	
          	</div>	
			<?php endif; ?>	 
			<form id="form3" name="form3" method="post" action="projects.php"> 
			<div class="Proposal_recea">
            		<div class="propa">Proposal sumbitted</div>
                	<div class="propb">              
                    	<!--<label>
                      	<input type="submit" name="button2" id="button2" class="Remove1" value="Remove selected" />
						<input type="hidden" name="act" value="act_remove_proposals" />
                    	</label>    -->             
                	</div>
            	</div>			
            	<div class="Proposal_receb">
					<table border="0.5px #CCC" bordercolor="#ccc" rules="all">
						<tr>
							<td width="10%" style="font-size:16px;" class="Proj2a">
								No.
							</td>
							<td width="40%" style="font-size:16px; text-align:center;" class="Proj2a">
								Client's projects entered
							</td>
							<td width="50%" style="font-size:16px; text-align:center;" class="Proj2a">
								Proposal Entered/Modified
							</td>
						</tr>
						<?php $_from = $this->_var['proposalslist']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'proposal');$this->_foreach['my_project_id'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['my_project_id']['total'] > 0):
    foreach ($_from AS $this->_var['proposal']):
        $this->_foreach['my_project_id']['iteration']++;
?>
						<tr >
							<td width="10%" style="font-size:12px; font-weight:bold;padding-top:10px; padding-bottom:10px;" >
								<?php if ($this->_var['proposal']['status'] == 1): ?>					                                                      
                            	<input type="checkbox" name="checkbox[]" class="kuang" id="checkbox" value="<?php echo $this->_var['proposal']['ppid']; ?>" style="margin-right:5px;"/>
								<?php else: ?>
								<span style="padding-left:25px;"></span>																					
						  		<?php endif; ?>                                            	
                        		<?php echo $this->_foreach['my_project_id']['iteration']; ?> 
							</td>
							<td width="40%" style="padding-left:30px; font-size:12px; font-weight:bold; padding-top:10px; padding-bottom:10px;">
								<?php if ($this->_var['proposal']['awarded'] == 0): ?> 
								<a href="projects.php?act=project_proposal&pid=<?php echo $this->_var['proposal']['pid']; ?>&ppid=<?php echo $this->_var['proposal']['ppid']; ?>"><?php echo $this->_var['proposal']['subject']; ?></a>
								<?php else: ?>
								<a href="projects.php?act=view_project&pid=<?php echo $this->_var['proposal']['pid']; ?>"><?php echo $this->_var['proposal']['subject']; ?>(Phone:<?php echo $this->_var['proposal']['contactPhone']; ?>)</a>
								<?php endif; ?>
								<?php if ($this->_var['proposal']['accepted'] == 1): ?>
								<span style="color:#FF0000; font-size:12px;">（Awarded, accepted）</span>
								<?php elseif ($this->_var['proposal']['awarded'] == 1): ?>
								<span style="color:#FF0000; font-size:12px;">（Awarded）</span>				
								<?php endif; ?>
							</td>
							<td width="50%" style="padding-left:80px; font-size:12px; font-weight:bold; padding-top:10px; padding-bottom:10px;;" >
								<?php echo $this->_var['proposal']['proposaledDate']; ?>
								<span style=" margin-right:50px;"></span>
								<?php if ($this->_var['proposal']['status'] == 1): ?>   
								<a href="projects.php?act=view_project&pid=<?php echo $this->_var['proposal']['pid']; ?>&ppid=<?php echo $this->_var['proposal']['ppid']; ?>">Edit proposal</a>
								<?php elseif ($this->_var['proposal']['awarded'] == 0): ?>
								Not awarded
								<?php elseif ($this->_var['proposal']['accepted'] == 0): ?>
								<a href="projects.php?act=act_accept_award&ppid=<?php echo $this->_var['proposalWon']['ppid']; ?>&pid=<?php echo $this->_var['proposalWon']['pid']; ?>">Accept</a>
								<?php elseif ($this->_var['proposal']['accepted'] == 1 && $this->_var['proposal']['review'] != 1): ?>
								<a href="projects.php?act=review_client&ppid=<?php echo $this->_var['proposal']['ppid']; ?>&pid=<?php echo $this->_var['proposal']['pid']; ?>">Review Client</a>
								<?php elseif ($this->_var['proposal']['review'] == 1): ?>
								Have Reviewed
								<?php endif; ?>
							</td>
						</tr>
						<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
						
					</table>
				
            		
					<?php echo $this->fetch('library/pages.lbi'); ?>
      			</div>
			</form>
      	</div>
    </div>
	<?php echo $this->fetch('library/page_footer.lbi'); ?>
</div>

<?php else: ?>
<style type="text/css">
<!--
#apDiv1 {
	position:absolute;
	left:1055px;
	top:410px;
	width:20px;
	height:30px;
	z-index:1;
}
#apDiv2 {
	position:absolute;
	left:333px;
	top:366px;
	width:58px;
	height:47px;
	z-index:1;
}
-->
</style>

<?php echo $this->fetch('library/page_header.lbi'); ?>
	<div class="column">
    	<div class="l_nav_con">
                <ul>
                    <li><a href="user.php" >My dashboard</a></li>
                    <li style="color: #3399FF"><a href="projects.php?act=my_fitness_listings" style="color: #FFFFFF; background-color: #CCCCCC" >My Fitness Listings</a></li>
                    <li ><a href="user.php?act=profile" >Manage account</a></li>
                </ul>
            </div>
    </div>
    <form id="form3" name="form3" method="post" action="projects.php">
	<div class="box1">
    	<div class="center">
    		<div class="right_posta">
            	<ul >
					<li><a href="projects.php?act=add">Post your fitness needs</a></li>
                	<li><a href="projects.php?act=browse">Browse training projects</a></li>
                </ul>
      		</div>  
            
        <div style="margin-top:20px;">	  
		<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:30px;border-collapse:collapse;border:none;border:solid #CCC 2px;">
  			<tr>
    			<td width="71%" height="25" align="left"><span style="font-size:30px; margin-left:15px; font-weight:bold;"><?php echo $this->_var['info']['firstname']; ?> <?php echo $this->_var['info']['lastname']['0']; ?></span></td>
    			<td width="29%" align="right"><p style="font-size:12px; margin-right:15px;">&nbsp;</p>
   			    <p style="font-size:12px; margin-right:15px;"><?php echo $this->_var['info']['projects_created']; ?> projects created</p></td>
  			</tr>
  			<tr>
    			<td height="20" align="left">				</td>
    			<td align="right"><span style="font-size:12px; margin-right:15px;"><?php echo $this->_var['info']['projects_awarded']; ?> projects awarded</span></td>
  			</tr>
			<tr>
    			<td height="20" align="left">				</td>
    			<td align="right"><span style="font-size:12px; margin-right:15px;">Total $<?php echo $this->_var['info']['totalEarn']; ?> Award</span></td>
  			</tr>
  			<tr>
    			<td height="19" align="left">
				<?php if ($this->_var['info']['address']): ?>
				<span style="font-size:12px; margin-left:15px;"><?php echo $this->_var['info']['address']; ?>, <?php echo $this->_var['info']['province']; ?>, <?php echo $this->_var['info']['country']; ?></span>
				<?php endif; ?>				</td>
    			<td align="right">
				<span style="font-size:12px; margin-right:15px;"><?php echo $this->_var['reviewed_count']; ?> reviews provided</span>
				</td>
  			</tr>
		</table>
        </div>
        	<div class="profile" style="text-align:center; background-color:#CCCCCC;">
			<br />
        	<a href="user.php">
			<?php if ($this->_var['info']['photo']): ?>
			<img src="<?php echo $this->_var['info']['photo']; ?>" />
			<?php elseif ($this->_var['info']['genderType'] == 'female'): ?>
			<img src="themes/default/images/girls.gif" />
			<?php else: ?>
			<img src="themes/default/images/boys.gif" />
			<?php endif; ?>
			</a>
			<br />
			<br />
			<label>
        	<a href="user.php?act=aboutme"><input type="submit" name="button" id="button" class="edita" style=" width:142px; height:35px;" value="Edit profile" /></a>
      		</label> 
			<br />
			<br />
			</div>
			<div class="Proposal_rece">
					
        		<div class="Proposal_recea">
            		<div class="propa">My listings</div>
                	<div class="propb">              
                    	<!--<label>
                      	<input type="submit" name="button" id="button" class="prop1" value="Remove selected" />
					  	<input type="hidden" name="act" id="button" class="prop1" value="act_remove_projects" />
                    	</label>  -->               
                	</div>
            	</div>			
            	<div class="Proposal_receb">
					<table border="0.5px #CCC" bordercolor="#ccc" rules="all">
						<tr>
							<td width="30%" style="font-size:16px; text-align:center;" class="Proj2a">
								List Title
							</td>
							<td width="30%" style="font-size:16px; text-align:center;" class="Proj2a">
								Status
							</td>
							<td width="40%" style="font-size:16px; text-align:center;" class="Proj2a">
								Next Step
							</td>
						</tr>
						<?php $_from = $this->_var['projectslist']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'project');if (count($_from)):
    foreach ($_from AS $this->_var['project']):
?>
						<tr style=" ">
							<td width="30%" style="font-size:12px; font-weight:bold; padding-top:10px; padding-bottom:10px; padding-left:20px; " >
								<?php if ($this->_var['project']['proposalsNum'] == 0): ?>				                                                      
                            	<input type="checkbox" name="checkbox[]" class="kuang" id="checkbox" value="<?php echo $this->_var['project']['pid']; ?>" style="margin-right:5px;"/>
								<?php else: ?>
								<span style="padding-left:25px;"></span>																					
						  		<?php endif; ?>                                            	
                        		<a href="projects.php?act=view_project&pid=<?php echo $this->_var['project']['pid']; ?>"><?php echo $this->_var['project']['subject']; ?></a> 
							</td>
							
							<?php if ($this->_var['project']['status'] == 0): ?>
							<td width="30%" style="padding-left:30px; font-size:12px; font-weight:bold;">
							List Title	
							</td>
							<td width="40%" style="padding-left:80px; font-size:12px; font-weight:bold;" >
							<a href="projects.php?act=edit&pid=<?php echo $this->_var['project']['pid']; ?>">Edit project detail<img src="themes/default/images/304.gif" /></a>	
							</td>
													
							<?php elseif ($this->_var['project']['status'] == 1): ?>
							<td width="30%" style="padding-left:30px; font-size:12px; font-weight:bold;">
							Live,<?php echo $this->_var['project']['lefttime']; ?> left
							</td>
							<td width="40%" style="padding-left:80px; font-size:12px; font-weight:bold;" >
							<?php if ($this->_var['project']['proposalsNum'] == 0): ?>
							<a href="projects.php?act=edit&pid=<?php echo $this->_var['project']['pid']; ?>">no bid yet, edit if u need</a>
							<?php else: ?>
							<a href="projects.php?act=view_project&pid=<?php echo $this->_var['project']['pid']; ?>"><?php echo $this->_var['project']['proposalsNum']; ?> proposals</a>
							<?php endif; ?>	
							</td>
																		
							<?php elseif ($this->_var['project']['status'] == 2): ?>
							<td width="30%" style="padding-left:30px; font-size:12px; font-weight:bold;">
							<img src="themes/default/images/305.gif" /> Project awarded
							</td>
							<td width="40%" style="padding-left:80px; font-size:12px; font-weight:bold;" >
							waiting for trainer to accept	
							</td>
																									
							<?php elseif ($this->_var['project']['status'] == 3): ?>
							<td width="30%" style="padding-left:30px; font-size:12px; font-weight:bold;">
							<img src="themes/default/images/306.gif" /> Training started :Project awarded and trainer accepted
							</td>
							<td width="40%" style="padding-left:80px; font-size:12px; font-weight:bold;" >
							<a href="projects.php?act=review&pid=<?php echo $this->_var['project']['pid']; ?>">Update training status, review trainer</a>	
							</td>
																			
							<?php elseif ($this->_var['project']['status'] == 4): ?>
							<td width="30%" style="padding-left:30px; font-size:12px; font-weight:bold;">
							<img src="themes/default/images/307.gif" /> Reviewed<br /><font style="font-size:12px; color:#6b97c4;">+ not completed yet</font>
							</td>
							<td width="40%" style="padding-left:80px; font-size:12px; font-weight:bold;" >
							<a href="#">Reviewed</a>	
							</td>
																			
							<?php elseif ($this->_var['project']['status'] == 5): ?>
							<td width="30%" style="padding-left:30px; font-size:12px; font-weight:bold;">
							<img src="themes/default/images/308.gif" /> Training completed<br /><font style="font-size:12px; color:#6b97c4;">+ reviewed </font>
							</td>
							<td width="40%" style="padding-left:80px; font-size:12px; font-weight:bold;" >
							<a href="#">Nothing left to do</a>	
							</td>																							
							<?php endif; ?>																					
							
						</tr>
						<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
						
					</table>
				
				
            		
					<?php echo $this->fetch('library/pages.lbi'); ?>
      			</div>
			</div>
		</div>      
	</div>
</form>

<?php echo $this->fetch('library/page_footer.lbi'); ?>
<?php endif; ?>

</body>
<script type="text/javascript">
<?php $_from = $this->_var['lang']['clips_js']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['item']):
?>
var <?php echo $this->_var['key']; ?> = "<?php echo $this->_var['item']; ?>";
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

function quotingchange(num)
{
	var id =  'quoting_state_' + num;
	var state = document.getElementById(id).value;
	if( state == "Stop Quoting")
	{
		document.getElementById(id).value = 'Resume Quoting';
	}
	else
	{
		document.getElementById(id).value = 'Stop Quoting';
	}
}

</script>
</html>
